package FactoryMode

object SimpleFactory {

  def createPizza(orderType: String): Pizza = {
    var pizza: Pizza = null
    if (orderType.eq("greek")) {
      pizza = new GreekPizza
    } else if (orderType.eq("huzi")) {
      pizza = new HuziPizza
    } else if (orderType.equals("chees")) {
      pizza = new CheesPizza
    } else {
    }
    pizza
  }
}
